import React from 'react'
import { EnvironmentOutline } from 'antd-mobile-icons'
import { useSelector } from 'react-redux'
import { useNavigate } from 'react-router-dom'


import MyHeader from '../../components/MyHeader'
import ClassifyContent from './ClassifyContent'

const Classify = () => {
  const router = useNavigate()
  const { city } = useSelector((state: any) => state.info)


  return (
    <div>
      <MyHeader title='分 类'>
        <div style={{ marginLeft: '-20px', fontSize: '15px' }} onClick={() => router('/city')}>
          <EnvironmentOutline />
          {
            city ?
              <span style={{ marginLeft: '5px' }}>
                {city.name}
              </span>
              : <span style={{ marginLeft: '5px' }}>
                定位
              </span>
          }
        </div>
      </MyHeader>

      <ClassifyContent></ClassifyContent>

    </div>
  )
}

export default Classify
